var t = require;
var e = module;
var o = exports;
Object.defineProperty(o, "__esModule", { value: !0 });
var n = t("PlatfromEnum"),
    i = t("WebSDK"),
    s = t("TTSDK"),
    r = t("AndroidSdk"),
    c = t("IOSSDk"),
    a = t("WXSDK"),
    u = t("QQSDK"),
    l = t("KSSDK"),
    d = t("UCSDK"),
    p = t("OPPOSDK"),
    h = t("VIVOSDK"),
    f = (function () {
        function t() {
            (this._platfrom = -1),
                (this._sdk = null),
                (this._isInit = !1),
                (this._isNoAd = !1),
                (this.gameName = "StickHero");
        }
        return (
            (t.prototype.init = function () {
                if (!this._isInit) {
                    var t, e;
                    switch (((this._isInit = !0), (this._platfrom = this.getPlatfrom()), this._platfrom)) {
                        case n.default.WEB:
                            t = i.default;
                            break;
                        case n.default.TT:
                            t = s.default;
                            break;
                        case n.default.ANDROID:
                            t = r.default;
                            break;
                        case n.default.IOS:
                            t = c.default;
                            break;
                        case n.default.WX:
                            t = a.default;
                            break;
                        case n.default.QQ:
                            t = u.default;
                            break;
                        case n.default.KS:
                            t = l.default;
                            break;
                        case n.default.UC:
                            t = d.default;
                            break;
                        case n.default.OPPO:
                            t = p.default;
                            break;
                        case n.default.VIVO:
                            t = h.default;
                    }
                    if (t) {
                        (e = new t()).init(), (this._sdk = e);
                        var o = this.getLocalStorage("NoAd");
                        (this._isNoAd = 2 == o), console.log("初始化sdk完成", this._platfrom);
                    } else console.error("未知平台");
                }
            }),
            (t.prototype.isOpenShare = function () {
                return this._sdk.isOpenShare();
            }),
            (t.prototype.login = function (t) {
                this._sdk.login(t);
            }),
            (t.prototype.getUserInfo = function (t) {
                this._sdk.getUserInfo(t);
            }),
            (t.prototype.createMoreGamesButton = function (t) {
                this._sdk.createMoreGamesButton(t);
            }),
            (t.prototype.setClipboardData = function (t) {
                this._sdk.setClipboardData(t);
            }),
            (t.prototype.setLocalStorage = function (t, e) {
                this._sdk.setLocalStorage(t, e);
            }),
            (t.prototype.getLocalStorage = function (t) {
                return this._sdk.getLocalStorage(t);
            }),
            (t.prototype.getPlatfrom = function () {
                return n.default.VIVO;
                // return -1 != this._platfrom
                //     ? this._platfrom
                //     : window.tt
                //     ? n.default.TT
                //     : cc.sys.platform == cc.sys.ANDROID
                //     ? n.default.ANDROID
                //     : cc.sys.platform == cc.sys.MACOS ||
                //       cc.sys.platform == cc.sys.IPHONE ||
                //       cc.sys.platform == cc.sys.IPAD
                //     ? n.default.IOS
                //     : window.qq
                //     ? n.default.QQ
                //     : window.ks
                //     ? n.default.KS
                //     : cc.sys.platform == cc.sys.WECHAT_GAME && window.wx
                //     ? n.default.WX
                //     : window.uc
                //     ? n.default.UC
                //     : cc.sys.isBrowser
                //     ? n.default.WEB
                //     : cc.sys.platform == cc.sys.OPPO_GAME
                //     ? n.default.OPPO
                //     : cc.sys.platform == cc.sys.VIVO_GAME
                //     ? n.default.VIVO
                //     : n.default.WEB;
            }),
            (t.prototype.isWeb = function () {
                return this._platfrom == n.default.WEB;
            }),
            (t.prototype.isAndroid = function () {
                return this._platfrom == n.default.ANDROID;
            }),
            (t.prototype.isIOS = function () {
                return this._platfrom == n.default.IOS;
            }),
            (t.prototype.isApp = function () {
                return this._platfrom == n.default.ANDROID || this._platfrom == n.default.IOS;
            }),
            (t.prototype.isKS = function () {
                return this._platfrom == n.default.KS;
            }),
            (t.prototype.isUC = function () {
                return this._platfrom == n.default.UC;
            }),
            (t.prototype.isTT = function () {
                return this._platfrom == n.default.TT;
            }),
            (t.prototype.isWX = function () {
                return this._platfrom == n.default.WX;
            }),
            (t.prototype.isQQ = function () {
                return this._platfrom == n.default.QQ;
            }),
            (t.prototype.isOPPO = function () {
                return this._platfrom == n.default.OPPO;
            }),
            (t.prototype.isVIVO = function () {
                return this._platfrom == n.default.VIVO;
            }),
            (t.prototype.getOpenDataContext = function () {
                return this._sdk.getOpenDataContext();
            }),
            (t.prototype.postMessage = function (t) {
                this._sdk.postMessage(t);
            }),
            (t.prototype.startRecorder = function () {
                this._sdk.startRecorder();
            }),
            (t.prototype.stopRecorder = function (t) {
                this._sdk.stopRecorder(t);
            }),
            (t.prototype.getRecorderState = function () {
                return this._sdk.getRecorderState();
            }),
            (t.prototype.getIsScreenRecordVideo = function () {
                return this._sdk.getIsScreenRecordVideo();
            }),
            (t.prototype.showShareBtn = function (t) {
                return this._sdk.showShareBtn(t);
            }),
            (t.prototype.hideShareBtn = function () {
                return this._sdk.hideShareBtn();
            }),
            (t.prototype.getRecorderTime = function () {
                return this._sdk.getRecorderTime();
            }),
            (t.prototype.shareRecorder = function (t) {
                return this._sdk.shareRecorder(t);
            }),
            (t.prototype.showRewardVideo = function (t) {
                this._sdk.showRewardVideo(t);
            }),
            (t.prototype.playSurvey = function (t) {
                this._sdk.playSurvey(t);
            }),
            (t.prototype.playScreen = function (t) {
                void 0 === t && (t = 1), this._isNoAd || this._sdk.playScreen(t);
            }),
            (t.prototype.showBanner = function () {
                this._sdk.showBanner();
            }),
            (t.prototype.hideBanner = function () {
                this._sdk.hideBanner();
            }),
            (t.prototype.getLastAdTime = function () {
                return this._sdk.getLastAdTime();
            }),
            (t.prototype.getVideoState = function () {
                return this._sdk.getVideoState();
            }),
            (t.prototype.getSurveyState = function () {
                return this._sdk.getSurveyState();
            }),
            (t.prototype.vibrateShort = function () {
                this._sdk.vibrateShort();
            }),
            (t.prototype.vibrateLong = function () {
                this._sdk.vibrateLong();
            }),
            (t.prototype.rating = function () {
                this._sdk.rating();
            }),
            (t.prototype.showToast = function (t) {
                this._sdk.showToast(t);
            }),
            (t.prototype.showLoading = function (t) {
                this._sdk.showLoading(t);
            }),
            (t.prototype.hideLoading = function () {
                this._sdk.hideLoading();
            }),
            (t.prototype.sendEvent = function (t) {
                this._sdk.sendEvent(t);
            }),
            (t.prototype.getIsNoAd = function () {
                return this._isNoAd;
            }),
            (t.prototype.setKeepScreenOn = function (t) {
                this._sdk.setKeepScreenOn(t);
            }),
            (t.prototype.onVideoSuccess = function () {
                this._sdk.onVideoSuccess();
            }),
            (t.prototype.onVideoFail = function () { }),
            (t.prototype.shareRecorderSuccess = function () { }),
            (t.prototype.shareRecorderFail = function () { }),
            (t.prototype.sendHttpRequest = function (t, e, o, n) {
                this._sdk.sendHttpRequest(t, e, o, n);
            }),
            (t.prototype.dyTokenSuccess = function (t, e) {
                this._sdk.dyTokenSuccess(t, e);
            }),
            (t.prototype.appleLoginSuccess = function (t, e) {
                this._sdk.appleLoginSuccess(t, e);
            }),
            (t.prototype.loginError = function () {
                this._sdk.loginError();
            }),
            (t.prototype.pay = function (t) {
                this._sdk.pay(t);
            }),
            (t.prototype.onPaymentSuccess = function (t) {
                this._sdk.onPaymentSuccess(t);
            }),
            (t.prototype.hasAppleLogin = function () {
                return this._sdk.hasAppleLogin();
            }),
            (t.prototype.logOut = function () {
                this._sdk.setLocalStorage("login", "false");
            }),
            (t.prototype.share = function (t) {
                this._sdk.share(t);
            }),
            (t.prototype.contentSafe = function (t) {
                this._sdk.contentSafe(t);
            }),
            (t.prototype.registerAccChange = function (t) {
                this._sdk.registerAccChange(t);
            }),
            (t.prototype.unRegisterAccChange = function () {
                this._sdk.unRegisterAccChange();
            }),
            (t.prototype.onShow = function (t) {
                this._sdk.onShow(t);
            }),
            (t.prototype.getLaunchOptionsSync = function () {
                return this._sdk.getLaunchOptionsSync();
            }),
            (t.prototype.getPlatFormDetail = function () {
                return this._sdk.getPlatFormDetail();
            }),
            (t.prototype.showCustomAd = function () {
                this._sdk.showCustomAd();
            }),
            (t.prototype.hideCustomAd = function () {
                this._sdk.hideCustomAd();
            }),
            (t.prototype.showCustomAdBig = function () {
                this._sdk.showCustomAdBig();
            }),
            (t.prototype.hideCustomAdBig = function () {
                this._sdk.hideCustomAdBig();
            }),
            (t.prototype.showGridAd = function () {
                this._sdk.showGridAd();
            }),
            (t.prototype.hideGridAd = function () {
                this._sdk.hideGridAd();
            }),
            (t.prototype.showGridScorllAd = function () {
                this._sdk.showGridScorllAd();
            }),
            (t.prototype.hideGridScorllAd = function () {
                this._sdk.hideGridScorllAd();
            }),
            t
        );
    })(),
    g = (window.Common = new f());
o.default = g;